home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / APPSETUP.ZIP / APPSETUP.H < prev    next >
C/C++ Source or Header  |  1993-06-10  |  10KB  |  327 lines

  1. /* Ownerb.h */
  2. #include <ctl3d.h>
  3.  
  4. #define WM_APPBAR_RESTART        (WM_USER+1001)
  5.  
  6. #define IDC_SCROLL            101
  7. #define IDC_CLOSEPROG            102
  8. #define IDC_BUTTONLOOK            103
  9. #define IDC_NOSOUND            104
  10. #define IDC_ICONS            110
  11. #define IDC_BUTTONS            120
  12. #define IDC_EDITS            140
  13. #define IDC_TEXTS            150
  14. #define IDC_RADIOS            160
  15. #define IDC_NEXT            170
  16.  
  17. #define IDD_STAYINFRONT         200
  18. #define IDD_QUICKEXIT            201
  19. #define IDD_CLOSEALL            202
  20. #define IDD_DEFAULT            203
  21. #define IDD_DOUBLECLICK            204
  22. #define IDD_BROWSE            205
  23. #define IDD_BIGBUTTONS            206
  24. #define IDD_TOP                210
  25. #define IDD_SCROLLTOP            211
  26. #define IDD_LEFT            220
  27. #define IDD_SCROLLLEFT            221
  28. #define IDD_BUTTONS            230
  29. #define IDD_SCROLLBUTTONS        231
  30. #define IDD_ROWS            240
  31. #define IDD_SCROLLROWS            241
  32. #define IDD_BORDER            242
  33. #define IDD_SCROLLBORDER        243
  34. #define IDD_HELP            251
  35. #define IDD_ABOUT            252
  36. #define IDD_EXITBUTTON            260
  37.  
  38. #define IDINIT_INIT            300
  39. #define IDINIT_CANCEL            301
  40. #define IDINIT_OK            302
  41. #define IDINIT_BROWSE            303
  42.  
  43. #define IDEXIT_NO            400
  44. #define IDEXIT_CANCEL            401
  45. #define IDEXIT_OK            402
  46. #define IDEXIT_RESTART            403
  47.  
  48. #define IDEND_SHELL            500
  49. #define IDEND_LOAD            501
  50. #define IDEND_NONE            502
  51. #define IDEND_START            503
  52. #define IDEND_RESTART            504
  53. #define IDEND_EXIT            505
  54. #define IDEND_SAVE            506
  55. #define IDEND_OK            507
  56. #define IDEND_CANCEL            508
  57.  
  58. #define IDDIR_OK            600
  59. #define IDDIR_CANCEL            601
  60. #define IDDIR_LIST            602
  61. #define IDDIR_PATH            603
  62. #define IDDIR_TEXT            604
  63.  
  64. #define IDSOUND_OK            700
  65. #define IDSOUND_CANCEL            701
  66. #define IDSOUND_TEST            702
  67. #define IDSOUND_BROWSE            703
  68. #define IDSOUND_NONE            704
  69. #define IDSOUND_ENABLE            705
  70. #define IDSOUND_APPSTART        706
  71. #define IDSOUND_APPEXIT         707
  72. #define IDSOUND_WINEXIT         708
  73. #define IDSOUND_PROGSTART        709
  74. #define IDSOUND_PROGCLOSE        710
  75. #define IDSOUND_DROPFILE        711
  76. #define IDSOUND_ERROR            712
  77. #define IDSOUND_SOUNDDIR        713
  78. #define IDSOUND_HELP            714
  79.  
  80. #define IDUPGRADE_YES            801
  81. #define IDUPGRADE_NO            802
  82. #define IDSAVE_YES            811
  83. #define IDSAVE_NO            812
  84. #define IDSAVE_PATH            813
  85. #define IDSAVE_BROWSE            814
  86. #define IDRESTART_YES            821
  87. #define IDRESTART_NO            822
  88.  
  89. #define IDSHL_LOAD            900
  90. #define IDSHL_RUN            901
  91. #define IDSHL_SHELLGROUP        902
  92. #define IDSHL_SHELL            903
  93. #define IDSHL_BROWSE            904
  94. #define IDSHL_DEFAULT            905
  95. #define IDSHL_HELP            906
  96.  
  97. #define INI_SYSTEM    "System"
  98. #define INI_BUTTON    "Buttons"
  99. #define INI_SOUND    "Sounds"
  100. #define INI_SHELL    "Shell"
  101. #define INI_FILE    "appbar.ini"
  102.  
  103. #define LEFT        "Left"
  104. #define TOP        "Top"
  105. #define COLUMNS        "Columns"
  106. #define BUTTONS     "Buttons"
  107. #define BORDER        "Border"
  108. #define QUICKEXIT    "QuickExit"
  109. #define CLOSEALL    "CloseAll"
  110. #define STAYINFRONT    "StayInFront"
  111. #define EXITBUTTON    "ExitButton"
  112. #define BIGBUTTONS    "BigButtons"
  113. #define DOUBLECLICK    "DoubleClick"
  114. #define INITIALIZED    "Initialized"
  115. #define DEFAULTICONDIR    "DefaultIconDir"
  116. #define SHELLGROUP    "ShellGroup"
  117. #define OLDSHELL    "OldShell"
  118.  
  119. #define SOUNDENABLE    "EnableSound"
  120. #define APPSTART    "AppBarStart"
  121. #define APPEXIT     "AppBarExit"
  122. #define WINEXIT     "WindowsExit"
  123. #define PROGSTART    "ProgramStart"
  124. #define PROGCLOSE    "ProgramClose"
  125. #define DROPFILE    "DropFile"
  126. #define ERRORMESSAGE    "ErrorMessage"
  127. #define SOUNDDIR    "SoundDirectory"
  128.  
  129. #define LEFT_DEFAULT        "-1"
  130. #define TOP_DEFAULT        "-1"
  131. #define COLUMNS_DEFAULT        "1"
  132. #define BUTTONS_DEFAULT     "8"
  133. #define QUICK_DEFAULT        "0"
  134. #define BORDER_DEFAULT        "0"
  135. #define CLOSEALL_DEFAULT    "1"
  136. #define CLOSEPROG_DEFAULT   "1"
  137. #define NOSOUND_DEFAULT     "0"
  138. #define SHOWMODE_DEFAULT    "0"
  139. #define STAYINFRONT_DEFAULT "0"
  140. #define EXITBUTTON_DEFAULT  "1"
  141. #define BIGBUTTONS_DEFAULT  "0"
  142. #define DOUBLECLICK_DEFAULT "0"
  143. #define INITIALIZED_DEFAULT "0"
  144. #define ICONNUMBER_DEFAULT  "0"
  145. #define BUTTONLOOK_DEFAULT  "0"
  146. #define SHELLGROUP_DEFAULT  "startup.grp"
  147.  
  148. #define SOUNDENABLE_DEFAULT    "0"
  149. #define APPSTART_DEFAULT    "<none>"
  150. #define APPEXIT_DEFAULT        "<none>"
  151. #define WINEXIT_DEFAULT        "<none>"
  152. #define PROGSTART_DEFAULT    "<none>"
  153. #define PROGCLOSE_DEFAULT    "<none>"
  154. #define DROPFILE_DEFAULT    "<none>"
  155. #define ERRORMESSAGE_DEFAULT    "<none>"
  156.  
  157.  
  158. #define MAXFILECHARS    81
  159. #define MAXDIGITS    5
  160. #define MAXBORDER    15
  161. #define NUMICONS    5
  162. #define NUMEDITS    4
  163. #define NUMBUTTONS    11
  164. #define MAXAPPS     48
  165. #define MAXRES        1280
  166. #define UP        1
  167. #define DOWN        0
  168. #define APPBARVERSION    400
  169. #define APPBAR4        400
  170.  
  171. typedef enum {NOTALIVE = FALSE, ALIVE = TRUE} STATUS;
  172.  
  173. typedef struct {
  174.     char    IcoName[MAXFILECHARS];
  175.     char    ProgName[MAXFILECHARS];
  176.     char    StartDir[MAXFILECHARS];
  177.     char    Params[MAXFILECHARS];
  178.     HWND    hWndApp;
  179.     int    IconNumber;
  180.     BOOL    ButtonLook;
  181.     STATUS    ProgStatus;
  182.     BOOL    Close;
  183.     short    ShowMode;
  184.     BOOL    NoSound;
  185.     } APPBARBUTTONS;
  186.  
  187. typedef struct {
  188.     short    Left;
  189.     short    Top;
  190.     int    Columns;
  191.     int    Buttons;
  192.     BOOL    CloseAll;
  193.     BOOL    StayInFront;
  194.     int    Initialized;
  195.     BOOL    BigButtons;
  196.     BOOL    DoubleClick;
  197.     int    Border;
  198.     char    DefaultIconDir[MAXFILECHARS];
  199.     char    ShellGroup[8*MAXFILECHARS];
  200.     } APPSYSTEM;
  201.  
  202. typedef struct {
  203.     BOOL    EnableSound;
  204.     char    AppBarStart[MAXFILECHARS];
  205.     char    AppBarExit[MAXFILECHARS];
  206.     char    WindowsExit[MAXFILECHARS];
  207.     char    ProgramStart[MAXFILECHARS];
  208.     char    ProgramClose[MAXFILECHARS];
  209.     char    DropFile[MAXFILECHARS];
  210.     char    ErrorMessage[MAXFILECHARS];
  211.     char    SoundDirectory[MAXFILECHARS];
  212.     } APPSOUND;
  213.  
  214. typedef enum {EXEFOCUS = 0, PARAMFOCUS = 1, DIRFOCUS = 2, ICONFOCUS = 3} FOCUS;
  215. typedef enum {ICONFILES = 0, EXEFILES = 1, WAVEFILES = 2, GROUPFILES = 3} BROWSEFILES;
  216.  
  217. char szBuffer[256];
  218. int temp;
  219.  
  220. #define WITHIN(val, min, max)      (((temp=val) > max ? max : (temp < min) ? min : temp))
  221. #define ONEORZERO(val)          WITHIN(val, 0, 1)
  222.  
  223.  
  224. extern APPBARBUTTONS AppButton[MAXAPPS], AppButtonDefault, AppButtonTemp;
  225. extern APPSYSTEM     AppSystem, AppSystemNew;
  226. extern APPSOUND      AppSound, AppSoundNew;
  227. extern HWND         hwndIcon[NUMICONS], hwndScroll, hwndEdit[NUMEDITS];
  228. extern HWND         hWnd, hwndButton[NUMBUTTONS], hwndText[NUMEDITS];
  229. extern HWND         hwndRadioButton[3], hwndCloseProg, hwndNext[2];
  230. extern HWND         hwndButtonLook, hwndNoSound;
  231. extern HINSTANCE     hInst;
  232. extern HICON         hIcon[MAXAPPS], hIconTemp;
  233. extern HBITMAP         hAppSetup;
  234. extern BOOL         bSave, bCreate, bAlreadyShell;
  235. extern BOOL         bCurrentIcon[NUMICONS], bNewDir;
  236. extern int         iCurrent, iBlackIcon, iPrevBlackIcon;
  237. extern int         MaxIconNumber[MAXAPPS], cxChar, cyChar;
  238. extern FOCUS         nFocus;
  239. extern FARPROC         lpfnOldEdit[NUMEDITS];
  240. extern char         Directory[256], TempStr[256];
  241.  
  242. /* defined in appsetup.c */
  243. long WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
  244.  
  245. /* defined in appedit.c */
  246. long WINAPI EditProc(HWND, UINT, WPARAM, LPARAM);
  247.  
  248. /* defined in init.c */
  249. extern BOOL InitFirstInstance(HINSTANCE);
  250.  
  251. /* defined in AppIni.c */
  252. extern VOID PASCAL IniRead(VOID);
  253. extern VOID PASCAL IniSave(VOID);
  254.  
  255. /* defined in AppChild.c */
  256. extern VOID UpdateEditWindows(int iCurrent);
  257. extern VOID UpdateRadioButtons(int iCurrentRB);
  258. extern VOID UpdateCheckBoxes(int iCurrent);
  259. extern VOID UpdateScrollIcons(int iCurrentIcon);
  260. extern VOID UpdateNextButtons(int);
  261. extern VOID CreateAllChildWindows(HWND hWnd, HINSTANCE hInst);
  262. extern VOID Insert(VOID);
  263. extern VOID Delete(VOID);
  264. extern VOID MoveUp(VOID);
  265. extern VOID MoveDown(VOID);
  266. extern VOID Next(int i);
  267.  
  268. /* defined in AppTools.c */
  269. extern VOID OkMsgBox(char *szCaption, char *szFormat, ...);
  270. extern VOID ErrorMsgBox(char *szCaption, char *szFormat, ...);
  271. extern VOID LoadIconFromFile(HICON *hIcon, int i);
  272. extern HBRUSH SetColorLightGray(HWND, HDC);
  273. extern HBRUSH SetColorStaticText(HWND, HDC);
  274. extern VOID LoadExeIcon(HICON *hIcon, int iCurrent);
  275. extern BOOL IsAppBarShell(VOID);
  276. extern HWND GetAppBarWindow(VOID);
  277.  
  278. /* defined in appsys.c */
  279. extern BOOL WINAPI SystemDlgProc(HWND, UINT, WPARAM, LPARAM);
  280.  
  281. /* defined in appshell.c */
  282. extern BOOL WINAPI ShellDlgProc(HWND, UINT, WPARAM, LPARAM);
  283.  
  284. /* defined in appinit.c */
  285. extern BOOL WINAPI InitDlgProc(HWND, UINT, WPARAM, LPARAM);
  286.  
  287. /* defined in append.c */
  288. extern BOOL WINAPI InitEndDlgProc(HWND, UINT, WPARAM, LPARAM);
  289.  
  290. /* defined in appexit.c */
  291. BOOL WINAPI ExitDlgProc(HWND, UINT, WPARAM, LPARAM);
  292.  
  293. /* defined in AppAbout.c */
  294. extern BOOL WINAPI AboutDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  295.  
  296. /* defined in appgrade.c */
  297. extern BOOL WINAPI UpgradeDlgProc(HWND, UINT, WPARAM, LPARAM);
  298.  
  299. /* defined in appsave.c */
  300. extern BOOL WINAPI SaveDlgProc(HWND, UINT, WPARAM, LPARAM);
  301.  
  302. /* defined in appstart.c */
  303. extern BOOL WINAPI RestartDlgProc(HWND, UINT, WPARAM, LPARAM);
  304.  
  305. /* defined in appbrows.c */
  306. extern BOOL PASCAL BrowseFile(char *FileName, HWND hWndCommDlgParent, BROWSEFILES FileType);
  307. extern BOOL WINAPI SelectDirDlgProc(HWND, UINT, WPARAM, LPARAM);
  308. extern void UpdateListBox(HWND hDlg);
  309. extern UINT GetListBoxIndex(HWND hDlg);
  310. extern void FileErrorHandler(void);
  311.  
  312. /* defined in appsound.c */
  313. extern BOOL WINAPI SoundDlgProc(HWND, UINT, WPARAM, LPARAM);
  314.  
  315. /*defined in AppBar.dll */
  316. extern TEXTMETRIC WINAPI RetrieveTextMetrics(HWND hWnd);
  317. extern void      WINAPI DrawBitmap(HDC hDC, short x, short y, HBITMAP hBitmap);
  318. extern APPSYSTEM  WINAPI ReadSystemIni(VOID);
  319. extern APPSOUND   WINAPI ReadSoundIni(VOID);
  320. extern VOID      WINAPI SaveSystemIni(APPSYSTEM AppSystem);
  321. extern VOID      WINAPI SaveSoundIni(APPSOUND AppSound);
  322. extern APPBARBUTTONS WINAPI ReadButtonIni(int i, LPSTR SectionName, LPSTR IniFile);
  323. extern VOID WINAPI SaveButtonIni(APPBARBUTTONS AppButton, int i, LPSTR SectionName, LPSTR IniFile);
  324. extern APPBARBUTTONS WINAPI InitButton(VOID);
  325. extern VOID      WINAPI ReadRunLoadIni(LPSTR run, LPSTR load);
  326. extern VOID      WINAPI SaveRunLoadIni(LPSTR run, LPSTR load);
  327.